The present invention relates to a method of processing forward, backward and bidirectional inferences at high speed using rules.
A known method of determining whether conditions are satisfied or not uses a network of rule condition parts analogous to a discrimination network. Such method is described in "Rete: A Fast Algorithm for the Many Pattern/Many Object Pattern Match Problem", Artificial Intelligence, vol. 19, No. 1, 1982, incorporated herein by reference.
According to the above method, satisfied conditions are determined whether they are satisfied or not by using a network into which conditions have been transformed, the conditions being the structural data composed of the names of so-called current data and one or a plurality of pairs of attribute names and attribute values.
The conditions of current data are constructed of a plurality of condition clauses representative of current data attributes, the condition clauses corresponding to nodes of the network. The following procedure is carried out to determine whether the conditions are satisfied or not: The current data are supplied to the network to check if the data satisfy the condition clauses stored in each node. If satisfied, the data are supplied to the next node, whereas if not, the process is terminated. The above processes are repeated. If the process reaches the terminal node, it is judged that the condition indicated by the condition name (rule name) described in the terminal node has been satisfied. This method is advantageous in its fast processing.
The above-described method concerns a fast algorithm for forward inference and not for bidirectional inference. There is known a bidirectional inference oriented method.
For example, consider a backward inference rule "G.rarw.A, B" representative of that event names A and B are checked to instantiate G. The backward inference is initiated by transforming the rule into "If G', A, B, Then G" and writing G' in the working memory. In other words, the characteristic feature of such backward inference is that only the rule contributable to judgement of a satisfied goal is used. That such a rule is to be used now is represented by G' like a flag which is added to the rule condition part, so that the rule can be used only when it is required, i.e., the rule can be used as if backward inference is initiated.
According to the above method, when a backward inference rule is transformed into a corresponding forward inference rule which is usable only when the associated goal is guided, a condition instructing such guidance is added to the condition part of the rule to determine whether the added condition is satisfied and thus initiate backward inference.
The problems associated with the above-described conventional backward inference method will be described with respect to its function and performance.
First, the problems associated with the function will be described. It is necessary for the inference processing of the conventional method to completely grasp the events used in the backward inference. Therefore, the events should be definitely discriminated between the forward and backward inferences.
This means that forward and backward rules should be written in clear and distinguishable designations. However, a rule "If A, B, then G" merely and literally states that "if A and B are satisfied, G can be obtained" so that the rule may be used both in forward and backward inferences. In other words, the use of the rule depends on the inference circumstance so that it may be used in forward inference or in backward inference depending on the circumstance at that time. Bidirectional inference by the above method is difficult to be realized.
The problems associated with the performance will next be described. It is necessary for the inference processing of the conventional method to completely grasp the events used in the backward inference and always monitor the events if they are to be checked. Namely, in the above example, assuming that the event A is not still determined whether it is satisfied or not during execution of the rule, it becomes necessary to judge if the event A is related to the backward inference, and if so, A' should be written in the working memory. Such judgement is necessary for all the condition part attributes. The above method is therefore fast for forward inference but slow for backward inference. Since pseudo backward inference is carried out using forward inference, the above judgement becomes necessary, which results in an overhead of the inference processing.
As a result, there remain the problems associated with the function and performance of the conventional bidirectional inference method realizing bidirectional inference using a fast forward inference method.